using System;

namespace SharpMud.Server.App
{
	/// <summary>
	/// This interface defines functionality that standarizes control and monitoring of a server application's execution
	/// </summary>
	public interface IAppExecutionHandle
	{
		/// <summary>
		/// Initialize a server application from an UnInitialized state
		/// </summary>
		void Initialize();
		/// <summary>
		/// Stats the server application from an Initialized or a Stopped state
		/// </summary>
		void Start();
		/// <summary>
		/// Pauses the server application from a Running state
		/// </summary>
		void Pause();
		/// <summary>
		/// Resumes the server application from a Paused state
		/// </summary>
		void Resume();
		/// <summary>
		/// Stops the server application from a Running or a Paused state
		/// </summary>
		void Stop();
		/// <summary>
		/// Disposes of the application system from a Stopped state
		/// </summary>
		void Dispose();
		
		/// <summary>
		/// The current status of the server application
		/// </summary>
		AppStatus							Status {get;}
		/// <summary>
		/// The event raised after the server system's status changes
		/// </summary>
		event AppStatusChangeHandler	StatusChanged;
	}
}
